import request from '../utils/request'

// 查询表单设置
export const queryDefinition = (modelId, versionId) => {
  return request({
    method: 'GET',
    url: `modeler-app/rest/form-models/${modelId}${versionId ? `/history/${versionId}` : ''}`
  })
}

// 查询表单设置
export const saveDefinition = (modelId, data) => {
  return request({
    method: 'PUT',
    url: `modeler-app/rest/form-models/${modelId}`,
    data
  })
}

// 查询表单列表
export const queryList = ()=>{
  return request({
    method: 'GET',
    url: `modeler-app/rest/form-models`
  })
}